<%@page import="com.model.TeacherInfo"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>学生管理系统</title>
</head>
<jsp:include page="islogin.jsp"></jsp:include>
<body style="margin-top:20px;font-size:14px;padding-top:20px;">
<jsp:useBean id="teacherInfoServer" class="com.jdbc.DAO.TeacherInfoServer"></jsp:useBean>
<%
    List<TeacherInfo> t = teacherInfoServer.queryAllTeacher();
		/* out.print(s.size()); */
%>
<center>
    <table  cellpadding="16" style="border:1px solid #eee;margin-top:20px;">
        <tr>
            <th>id</th><th>姓名</th><th>性别</th><th>出生日期</th><th>教授课程</th><th>备注</th><th></th>
        </tr>
        <%
            int i=0;
            for(TeacherInfo tea : t){
        %>
        <tr  <% if(i%2==0){%> bgcolor="#f4f4f4" <% } %>>
            <td><%=tea.getTeacher_id() %></td>
            <td><%=tea.getTeacher_name() %></td>
            <td><% if(tea.getTeacher_sex()==1) out.print("男");else out.print("女"); %></td>
            <td><%=tea.getTeacher_birthday() %></td>
            <td><%=tea.getTeacher_course() %></td>
            <td><%=tea.getTeacher_beizhu() %></td>
            <td><a href="modifyOneTeacher.jsp?teacher_id=<%=tea.getTeacher_id() %>">修改信息</a></td>
        </tr>
        <%
                i++;
            }
        %>

    </table>
</center>

</body>
</html>